package cll;

import static cll.Parameters.dt;
import static cll.Parameters.duree_persistence_deplacement_K;
import static cll.Parameters.rayonK;
import static cll.Parameters.vitesse_K;
import static java.lang.Math.random;


public class Killer extends Cell {
	public Killer (Environment envt){
		type = Type.Killer;
		environment = envt;
		positionspeed = new PositionSpeed(random()*20+50, random()*50+100,0);
		rayon = rayonK;
	}
	
	public void changeDirection() {
		if(Math.random() < dt/duree_persistence_deplacement_K){
			
			double randomDirection = (Math.random()-0.5)*2*Math.PI;
			positionspeed.changeSpeed(randomDirection, vitesse_K);
		}
		
	}

	@Override
	public Cell transforme() {
		// TODO Auto-generated method stub
		return new DeadCell();
	}

	@Override
	public void apoptosis() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void dealWithChemokine() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void transition() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Cell Reproduction() {
		// TODO Auto-generated method stub
		return new DeadCell();
	}

	@Override
	public void interaction(Cell c) {
		if (c.type == Type.Centrocyt){
			//((Centrocyt) c).triggerApoptosis();
		}
		
	}

}
